package com.oocl.ita.linstner.chatframe;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JTextPane;

import com.oocl.ita.qqclientt.QQClient;

public class ToAllClientsListener implements ActionListener {
	private JTextPane jtp1;

	public ToAllClientsListener(JTextPane jtp1) {
		super();
		this.jtp1 = jtp1;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		/*
		 * 点击toAll按钮，确定接收方为All
		 * 并设置标题栏为 "ALL"
		 */
		// 设置toClient 
		System.out.println("ToAllClientsListener : " + QQClient.getClient());
		QQClient.getToClient().setAccout("All");
		System.out.println("ToAllClientsListener : " + QQClient.getClient() + " " + QQClient.getToClient());
		
		// 改标题栏
		jtp1.setText("To ALL");
	}

}
